package model 
{
	import model.data.InventoryObjectTypes;
	/**
	 * ...
	 * @author Gaz Williams
	 * 
	 * factory class holding the text outcomes for correct and incorrect objects given to each npc
	 * 
	*/
	public class NPCFeedback
	{
		
		private static var correctFeedback:Array;
		private static var inCorrectFeedback:Array;
		
		public static function getText(forInventoryItem:InventoryObjectTypes, isCorrect:Boolean):String
		{
			
			var feedback:String;
			
			if (isCorrect)
			{
				
				if ( correctFeedback == null) 
				{
					correctFeedback = new Array(9);
					
					correctFeedback[InventoryObjectTypes.NOTHING] 						= "PLAYER: EVIL BOSS broke another COMPUTER MONITOR! I’d better throw it out before MANAGER sees\n" +
																						  "MANAGER: WHAT?? you broke another MONITOR!?!?!?\n" +
																						  "PLAYER: No, I was just about to....\n" +
																						  "MANAGER: You broke ANOTHER ONE!?!? These things are expensive you know!!\n" +
																						  "MANAGER: You get ONE MORE CHANCE, if something else is broken YOU’RE FIRED!!!!\n" +
																						  "EVIL BOSS: HAHA, I’m gonna get you FIRED, so MANAGER will hire my little brother instead!\n" +
																						  "EVIL BOSS: So many things will be broken you’ll NEVER be able to fix them before MANAGER gets back!!\n";
																						  
					
					correctFeedback[InventoryObjectTypes.DEAD_RAT] 						= "There’s a RAT in me kitchen, what am I gonna do??\n" + 
																						  "NASTY!!!!! I gotta put this somewhere before I catch a disease!!\n" +
																						  "DEAD RAT GET!";
																						  
					correctFeedback[InventoryObjectTypes.FRIDGE_HANDLE] 				= "Got rid of that nasty DEAD RAT, I think I’m seeing purple spots...\n" +
																						  "What this? The Door HANDLE for the FRIDGE?? Oh, I’d better sort that out....\n"+
																						  "FRIDGE HANDLE GET!";
					
					correctFeedback[InventoryObjectTypes.GAFFER_TAPE] 					= "There, fixed that!! I’ll check inside the FRIDGE a second....\n" +
																						  "Why is there GAFFA TAPE in the fridge???\n" +
																						  "I’ll take it out, may come in handy to repair something....\n" +
																						  "GAFFA TAPE GET!";
					
					correctFeedback[InventoryObjectTypes.WOOD_SPLINTER] 				= "What a mess!! someone must have taken an axe to this table!!\n" +
																						  "I’ll knew this GAFFA TAPE would come in handy...\n" +
																						  "This SPLINTER looks like a PLUG, might be handy to block something up....\n" +
																						  "PLUG SHAPED WOOD SPLINTER GET!";
																						  
					correctFeedback[InventoryObjectTypes.PAPER_CUP] 					= "This PLUG SHAPED WOOD SPLINTER looks about the same size as that hole in the water bottle....\n" +
																						  "That should do it, leak stopped!!\n" +
																						  "I’ll take a PAPER CUP, you never know.....\n" +
																						  "PAPER CUP GET!";
																						  
					correctFeedback[InventoryObjectTypes.PAPER_CUP_FILLED_WITH_SAND] 	= "Oh no!! there’s SAND in the printer!\n" +
																						  "I’ll scrape it out into this PAPER CUP...\n" +
																						  "That should do it, the printer seems to work now.....\n" +
																						  "PAPER CUP FILLED WITH SAND GET!";
					
					
					correctFeedback[InventoryObjectTypes.MANAGERS_TROPHY] 				= "I need to put this fire out! It’s electric, so I can’t use water!\n" +
																						  "I’ll pour in this PAPER CUP FILLED WITH SAND....\n" +
																						  "Phew! lucky that fire didn’t melt the microwave too badly!\n" +
																						  "No wonder it was on fire, the MANAGER'S TROPHY was in there!!\n" +
																						  "MANAGER'S TROPHY GET!";
																						  
					
					
				}
				
				feedback = correctFeedback[forInventoryItem.type];
				
			} 
			else
			{
				if ( inCorrectFeedback == null) 
				{
					inCorrectFeedback = new Array(9);
					
					/*
					inCorrectFeedback[InventoryObjectTypes.NOTHING] 					= "...uhm...you don't have anything to use...";
					
					inCorrectFeedback[InventoryObjectTypes.DEAD_RAT] 					= "There's a stain on the floor where that RAT was, I don't think anyone will notice though";
					inCorrectFeedback[InventoryObjectTypes.FRIDGE_HANDLE] 				= "Why am I here, I don’t need to put anything in the WASTE BIN!!";
					inCorrectFeedback[InventoryObjectTypes.GAFFER_TAPE] 				= "I’m not hungry, I don’t need anything from the FRIDGE right now....";
					inCorrectFeedback[InventoryObjectTypes.WOOD_SPLINTER] 				= "I don't need to be round here right now....";
					inCorrectFeedback[InventoryObjectTypes.PAPER_CUP] 					= "I’m not thirsty at the moment....";
					inCorrectFeedback[InventoryObjectTypes.PAPER_CUP_FILLED_WITH_SAND] 	= "I don’t need anything printing right now....";
					inCorrectFeedback[InventoryObjectTypes.MANAGERS_TROPHY] 			= "I don’t need to nuke any food right now.....";
					*/
					inCorrectFeedback[InventoryObjectTypes.NOTHING] 					= "...uhm...you don't have anything to use...";
					
					inCorrectFeedback[InventoryObjectTypes.DEAD_RAT] 					= "There's a stain on the floor where that RAT was, so why did I pick this up again? need to get rid of this...";
					inCorrectFeedback[InventoryObjectTypes.FRIDGE_HANDLE] 				= "A FRIDGE HANDLE huh? Well there must be a million and one uses for this...";
					inCorrectFeedback[InventoryObjectTypes.GAFFER_TAPE] 				= "GAFFER TAPE makes anything all fixy...but not this, try something else that's broken";
					inCorrectFeedback[InventoryObjectTypes.WOOD_SPLINTER] 				= "This WOOD SPLINTER looks a lot like a plug...this needs to go somewhere else.";
					inCorrectFeedback[InventoryObjectTypes.PAPER_CUP] 					= "I’m not thirsty at the moment...so what is this PAPER CUP for?";
					inCorrectFeedback[InventoryObjectTypes.PAPER_CUP_FILLED_WITH_SAND] 	= "What the hell? Well if this PAPER CUP was filled with water I know what I could use it on...";
					inCorrectFeedback[InventoryObjectTypes.MANAGERS_TROPHY] 			= "Well what can I say ? We didn't make any more game past here...";
				}
				
				feedback = inCorrectFeedback[forInventoryItem.type];
			}
			
			return feedback;
		}
		
	}

}
